Chris Pollett > Old Classes >
CS174

( Print View )

Student Corner:
  [Grades Sec1]

  [Submit Sec1]

  [Class Sign Up Sec1]

  [
Lecture Notes]
  [Discussion Board]

Course Info:
  [Texts & Links]
  [Topics/Outcomes]
  [Outcomes Matrix]
  [Grading]
  [HW Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Additional Policies]
  [Announcements]

HWs and Quizzes:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5][Quizzes]

Practice Exams:
  [Mid1]  [Final]

                           












CS174 Fall 2010Practice Midterm

To study for the midterm I would suggest you: (1) Know how to do (by heart) all the practice problems. (2) Go over your notes at least three times. Second and third time try to see how much you can remember from the first time. (3) Go over the homework problems. (4) Try to create your own problems similar to the ones I have given and solve them. (5) Skim the relevant sections from the book. (6) If you want to study in groups, at this point you are ready to quiz each other. The practice midterm is below. Here are some facts about the actual midterm: (a) It is closed book, closed notes. Nothing will be permitted on your desk except your pen (pencil) and test. (b) You should bring photo ID. (c) There will be more than one version of the test. Each version will be of comparable difficulty. (d) One problem (less typos) on the actual test will be from the practice test.

1. Briefly describe and give an example of an HTTP GET request and response message.

2. Write a short HTML 5 validating, UTF-8 document that has title "test" and an h1 tag with test in it. Robots should not index this page nor use the open directory to get information about it.

3. Give a code fragment containing an HTML form that has as its action somewhere.com, has a text field, a check box, and a submit button on it. Your form should make use of label's or the title attribute so that it is WAI compliant.

4. Explain the difference between a class and an id selector for CSS. Explain how position relative and position absolute work.

5. Write a short PHP script which saves to a file post_stuff.txt only the data that was posted to it. If we wanted to do this with file locking what would we do?

6. Briefly explain how the HTTP cookie protocol works. How are sessions implemented using cookies?

7. Explain how inheritance can be done in PHP (Both subclasses and interfaces)? How does one refer to methods in the super class?

8. What is the git analog of svn checkout? What does git checkout do?

9. What is the prototype property of a function object in Javascript? Give some example uses of it.

10. For the form in (#3) explain how you could prevent using javascript the form from being submitted, if the text field didn't have a valid state name in it.